<template>
  <div class="sideBar">
    <!--link是添加路由，菜单名由slot接收-->
    <side-bar-item link="/home/relativeGraph">
      <a>子菜单栏1</a>
    </side-bar-item>
    <side-bar-item link="/home/user">
      <a>子菜单栏2</a>
    </side-bar-item>
    <side-bar-item link="/home/Good">
      <a>商品属性</a>
    </side-bar-item>

  </div>
</template>

<script>
  import SideBarItem from "./sideBarItem";
  export default {
    name: "SideBar",
    components: {
      SideBarItem
    },
    data() {
      return {}
    },
  }
</script>

<style scoped>
  .sideBar {
    /* display: none; */
    background: #444359;
    font-size: 14px;
    padding-left: 0px;
    margin-left: -120px;
    width: 120px;
  }

  .sideBar li {
    border-bottom: 1px solid #4b4a5e;
  }

  .sideBar a {
    display: block;
    text-decoration: none;
    color: #d9d9d9;
    padding: 12px;
    padding-left: 42px;
    -webkit-transition: all 0.25s ease;
    -o-transition: all 0.25s ease;
    transition: all 0.25s ease;
    margin-left: 120px;
  }

  .sideBar a:hover {
    background: #b63b4d;
    color: #FFF;
  }
</style>